Skip to content

fix(web): Esc in the license search closes it without closing Settings - #41647

Open
only21mil wants to merge 3 commits into
pingdotgg:mainfrom
only21mil:fix/web-settings-license-search-escape
Open

only21mil wants to merge 3 commits into
pingdotgg:mainfrom
only21mil:fix/web-settings-license-search-escape

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

Pressing Escape in the Open-source licenses search (Settings → About → Open-source licenses) cleared the search and also closed Settings. The search's key handler called preventDefault() but not stopPropagation(), and the Settings dialog's Escape dismiss ignores defaultPrevented.

The handler now stops the event, so Escape closes only the search, and the next Escape closes Settings. The keybindings search (#35161) and the Files search (#41616) let Escape through when they are empty because those fields are always on screen. This search only appears after you click its icon, so Escape always closes it first, even when it is empty.

A browser test renders the panel inside the real Settings modal. It fails on main, where Settings closes on the first Escape, and passes with the fix. An AI agent (Claude Opus 5.5, Claude Code in T3 Code) ran the test on both revisions, vp run check:changed and the browser captures below.

Setup: Linux, Chromium (T3 Browser panel), light theme, 1280×800, fresh isolated dev state (vp run dev --no-seed) on each commit. Server addresses are redacted.
Steps: Settings → About → Open-source licenses → search icon → type react → Escape

Before (0fd87d3c2e8) After (6d28e10b6ca)
Escape in the license search closes Settings Escape clears the license search and Settings stays open
Escape in the license search closes Settings Escape clears the license search and Settings stays open

Links: #35161, #41616

Not shown: desktop runs the same web component. Mobile uses a native search screen with no Escape handling, so it is unchanged.

Generated with Claude Opus 5.5 in T3 Code Nightly

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR changes the test suite by +1 test cases (browser +1, unit 0, server 0).

New browser test files: apps/web/src/components/settings/OpenSourceLicenses.browser.test.tsx.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

When Escape is pressed in the license search, the handler now stops the event from propagating and focuses the nearest app modal before it clears the query and closes search. A browser test checks that Settings remains open and that a later Escape closes it.

Changes: License search Escape handling

Layer / File(s) Summary
Escape handling and browser validation
apps/web/src/components/settings/OpenSourceLicenses.tsx, apps/web/src/components/settings/OpenSourceLicenses.browser.test.tsx
The Escape handler stops event propagation and focuses the nearest app modal before clearing the query and closing search. The browser test checks that Escape closes search while Settings remains open, reopening search starts empty, and a later Escape closes Settings.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested labels: bugfix

Suggested reviewers: maria-rcks, macroscopeapp

Merge Risk: Minimal · up to 19080

Pressing Escape in the license search should now close only the search, and the next Escape closes Settings. The change is small, and a browser test covers that sequence, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(web): Esc in the license search closes it without closing Settings" states the main change: Escape in the open-source license search now closes only the search. It follows the conventio…
Description check Passed The description covers the problem (Escape in the license search also closes Settings), the change (the handler stops the event, and the next Escape closes Settings), the scope (links to #35161 and #4…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(web): Esc in the license search closes it without closing Settings" states the main change: Escape in the open-source license search now closes only the search. It follows the conventional commit format and matches the raw summary, which says the key handler now stops propagation. The title is specific and does not reference unrelated files.

Full details: Description check

Explanation

The description covers the problem (Escape in the license search also closes Settings), the change (the handler stops the event, and the next Escape closes Settings), the scope (links to #35161 and #41616 and a note on why the bug is not in other search fields), and verification (a browser test that fails on main and passes with the fix, plus before/after screenshots and the setup used). It does not follow the template headings exactly, and the Scope section does not say why no issue is linked. The Verification section names the agent and the model, which the template asks for. The Change section also does not explain the focus handling that the objectives mention. These are minor gaps, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 02c58c8 and 1908058.

Files selected for processing: 2

  • apps/web/src/components/settings/OpenSourceLicenses.browser.test.tsx
  • apps/web/src/components/settings/OpenSourceLicenses.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 23, 2026
juliusmarminge and others added 2 commits November 23, 2026 20:32
Closing the search unmounted the focused input, so the dialog moved focus
to a control whose tooltip took the next Esc and Settings stayed open.
Move focus to the Settings surface before the input goes away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). takeover:in-progress A takeover lead is working on this PR vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants